Hey to be clear, this part at the bottom of content_management.py corresponds to only 'Basics' section, does that mean for editing a new section I would have to replace 'Basics' with another topic,, make Basics edits, then run the two files: , init creator, html creator? Sort of like you manage one section at a time? Do I manually copy paste the results or are they appended to the init py and html files automatically? This is a cool system and Im using it for blog posts. Thank you.
if __name__ == "__main__": x = Content()
print(x["Basics"])
for each in x["Basics"]: print(each[1])
(PS. just so you know, for editing posts here i have to delete the <pre tags that pop up and retype code tags each time. not sure why. anyways no big deal lol
You must be logged in to post. Please login or register an account.
If you were to add another page, you'd add it to the content python file. The key would likely be the topic type or something like that for your blog, or you could actually just have a list rather than a dict.
In my case, if you wanted to add something to the basics tutorials, you would go into the content_management.py file, and add the title and link to it. From there, you also need to give an actual link to it in the __init__.py file.
There is nothing automatic at this point, but you can make an automated script that does this for you. For example, I have a script that automatically adds this stuff to my __init__.py file that I use.
I also have something that automatically generates the required HTML files for me, which I then fill in.
As for the editing with code, thanks for bringing that to my attention!
-Harrison 8 years ago
Last edited 8 years ago
You must be logged in to post. Please login or register an account.
Thanks for that info. Would you be so kind as to post those and the code for flask vid 23 - CMS conclusion, under that video? I could prob find it on github but havent looked. Would be appreciated. I will adapt it to suit my needs and being new need a little guidance on certain things. Youre awesome for posting your sites code. True open source.
-kingfitz 8 years ago
You must be logged in to post. Please login or register an account.